package demo8;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/**
 * Created by Administrator on 2017/4/6.
 */
//: SimpleCollection.java
// A simple example using the new Collections
public class SimpleCollection {
    public static void main(String[] args) {
        Collection c = new ArrayList();
        for (int i = 0; i < 10; i++)
            c.add(Integer.toString(i));
        Iterator it = c.iterator();
        while (it.hasNext())
            System.out.println(it.next());
    }
} ///:~
